package com.woniuxy.config;

import com.woniuxy.interceptor.AuthPermInterceptor;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Configuration;
import org.springframework.web.servlet.config.annotation.InterceptorRegistry;
import org.springframework.web.servlet.config.annotation.WebMvcConfigurer;

/**
 * @Author: 马宇航
 * @Description: springmvc的配置类,用于注册拦截器的
 * @DateTime: 22/10/14/0014 16:00
 * @Component: 成都蜗牛学苑
 **/
@Configuration
public class InterceptorsConfiguration implements WebMvcConfigurer {
    @Autowired
    AuthPermInterceptor authPermInterceptor;
    @Override
    public void addInterceptors(InterceptorRegistry registry) {
        registry.addInterceptor(authPermInterceptor);
    }
}
